<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>运单管理</title>
	<meta http-equiv="Content-type" content="text/html; charset=utf-8">
	<meta name="decorator" content="ani"/>
	<%@ include file="/webpage/include/bootstraptable.jsp"%>
	<%@include file="/webpage/include/treeview.jsp" %>
	<%@include file="tmsWaybillList.js" %>
	<style type="text/css">
		.circle {    width: 18px;
			height: 18px;
			background-color:red;
			border-radius: 50%;
			-moz-border-radius: 50%;
			-webkit-border-radius: 50%;
		}
		.circle1 {    width: 18px;
			height: 18px;
			background-color:green;
			border-radius: 50%;
			-moz-border-radius: 50%;
			-webkit-border-radius: 50%;
		}
		.circle2 {    width: 18px;
			height: 18px;
			background-color:grey;
			border-radius: 50%;
			-moz-border-radius: 50%;
			-webkit-border-radius: 50%;
		}
		.circle3 {    width: 18px;
			height: 18px;
			background-color:blue;
			border-radius: 50%;
			-moz-border-radius: 50%;
			-webkit-border-radius: 50%;
		}
	</style>
</head>
<body>
	<div class="wrapper wrapper-content">
	<div class="panel panel-primary">
	<div class="panel-heading">
		<h3 class="panel-title">运单列表</h3>
	</div>
	<div class="panel-body">
		<sys:message content="${message}"/>
	<!-- 搜索 -->
	<div class="accordion-group">
	<div id="collapseTwo" class="accordion-body collapse">
		<div class="accordion-inner">
			<form:form id="searchForm" modelAttribute="tmsWaybill" class="form form-horizontal well clearfix">
				<div class="col-xs-12 col-sm-6 col-md-4">
					<label class="label-item single-overflow pull-left" title="装运单号：">装运单号：</label>
					<form:input path="shipmentNumbers" htmlEscape="false" maxlength="64"  class=" form-control"/>
				</div>
				<div class="col-xs-12 col-sm-6 col-md-4">
					<label class="label-item single-overflow pull-left" title="装运单号：">合同号：</label>
					<form:input path="code" htmlEscape="false" maxlength="64"  class=" form-control"/>
				</div>
				<div class="col-xs-12 col-sm-6 col-md-4">
					<label class="label-item single-overflow pull-left" title="车牌号：">承运商：</label>
					<form:input path="commonCarrier" htmlEscape="false" maxlength="64"  class=" form-control"/>
				</div>
				<div class="col-xs-12 col-sm-6 col-md-4">
					<label class="label-item single-overflow pull-left" title="车牌号：">车牌号：</label>
					<form:input path="plateNumber" htmlEscape="false" maxlength="64"  class=" form-control"/>
				</div>
				<div class="col-xs-12 col-sm-6 col-md-4">
					<label class="label-item single-overflow pull-left" title="装运单号：">司机：</label>
					<form:input path="driverName" htmlEscape="false" maxlength="64"  class=" form-control"/>
				</div>
				<div class="col-xs-12 col-sm-6 col-md-4">
					<label class="label-item single-overflow pull-left" title="状态：">预付款状态：</label>
					<select class="form-control" name="yfk">
						<option value="">请选择</option>
						<option value="未过账">未过账</option>
						<option value="预处理">预处理</option>
						<option value="已过账">已过账</option>
					</select>

				</div>
				<div class="col-xs-12 col-sm-6 col-md-4">
					<label class="label-item single-overflow pull-left" title="状态：">回执状态：</label>
					<select class="form-control" name="hzjs">
						<option value="">请选择</option>
						<option value="未过账">未过账</option>
						<option value="预处理">预处理</option>
						<option value="已过账">已过账</option>
					</select>

				</div>
		 <div class="col-xs-12 col-sm-6 col-md-4">
			<div style="margin-top:26px">
			  <a  id="search" class="btn btn-primary btn-rounded  btn-bordered btn-sm"><i class="fa fa-search"></i> 查询</a>
			  <a  id="reset" class="btn btn-primary btn-rounded  btn-bordered btn-sm" ><i class="fa fa-refresh"></i> 重置</a>
			 </div>
	    </div>	
	</form:form>
	</div>
	</div>
	</div>
	
	<!-- 工具栏 -->
	<div id="toolbar">


		<button id="jf" class="btn btn-success" disabled onclick="yfk()">
			预付款
		</button>
		<button id="jf1" class="btn btn-success" disabled onclick="yfkqr()">
			预付款确认
		</button>

		<button id="hz" class="btn btn-primary" disabled onclick="hzfk()">
			回执结算(含货到)
		</button>
		<button id="hz1" class="btn btn-success" disabled onclick="hzqr()">
			回执确认
		</button>


	        	<a class="accordion-toggle btn btn-default" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo">
					<i class="fa fa-search"></i> 检索
				</a>
		    </div>
		
	<!-- 表格 -->
	<table id="tmsWaybillTable" class="table text-nowrap"  data-toolbar="#toolbar"></table>

    <!-- context menu -->

	</div>
	</div>
	</div>
	<div class="modal fade" id="hzqr" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog" style="width:1100px">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h4 class="modal-title" >回执结算确认</h4>
				</div>
				<div class="modal-body">
					<table class="table table-bordered">
						<tr>
							<td width="15%"><input readonly="readonly"class="form-control " value="收款人"/></td>
							<td><input id="skr4" readonly="readonly" class="form-control "/></td>

							<td width="15%"><input readonly="readonly"class="form-control " value="卡号"/></td>
							<td><input id="kh4" readonly="readonly" class="form-control "/></td>

							<td width="15%"><input readonly="readonly"class="form-control " value="开户行"/></td>
							<td><input id="khh4" readonly="readonly" class="form-control "/></td>
						</tr>
						<tr>
							<td width="15%"><input readonly="readonly"class="form-control " value="货到付款金额"/></td>
							<td><input id="hdfk4" readonly="readonly" class="form-control "/></td>
							<td width="15%"><input readonly="readonly"class="form-control " value="实付货到金额"/></td>
							<td><input id="hdxj4" readonly="readonly" class="form-control number"/></td>
						</tr>
						<tr>
							<td width="15%"><input readonly="readonly"class="form-control " value="回执合同金额"/></td>
							<td><input id="hzht4" readonly="readonly" class="form-control "/></td>
							<td width="15%"><input readonly="readonly"class="form-control " value="实付回执现金"/></td>
							<td><input id="xj4" readonly="readonly" class="form-control number"/></td>
						</tr>
						<tr>
							<td width="15%"><input readonly="readonly"class="form-control " value="回执协议金额"/></td>
							<td><input id="hzxy4" readonly="readonly" class="form-control "/></td>
							<td width="15%"><input readonly="readonly"class="form-control " value="实付回执油卡"/></td>
							<td><input id="yk4" readonly="readonly" class="form-control number"/></td>
							<td width="15%"><input readonly="readonly"class="form-control " value="油卡卡号"/></td>
							<td><input id="code4" readonly="readonly" class="form-control number"/></td>
						</tr>
						<tr>
							<td width="15%"><input readonly="readonly"class="form-control " value="回执总金额"/></td>
							<td><input id="hzzje4" readonly="readonly" class="form-control "/></td>
							<td width="15%"><input readonly="readonly"class="form-control " value="实付总金额"/></td>
							<td><input id="sfzje1" readonly="readonly" class="form-control "/></td>
							<td width="15%"><input readonly="readonly"class="form-control " value="增减说明"/></td>
							<td><input id="remark4" readonly="readonly" class="form-control required"/></td>
						</tr>
					</table>

				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" onclick="qx4()">作废</button>
					<button type="button" class="btn btn-primary" onclick="qd4()">确定</button>
				</div>
			</div><!-- /.modal-content -->
		</div><!-- /.modal -->
	</div>
	<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog" style="width:1100px">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabel">回执结算</h4>
				</div>
				<div class="modal-body">
					<table class="table table-bordered">
						<tr>
							<td width="15%"><input readonly="readonly"class="form-control " value="收款人"/></td>
							<td><input id="skr" readonly="readonly" class="form-control "/></td>

							<td width="15%"><input readonly="readonly"class="form-control " value="卡号"/></td>
							<td><input id="kh" readonly="readonly" class="form-control "/></td>

							<td width="15%"><input readonly="readonly"class="form-control " value="开户行"/></td>
							<td><input id="khh" readonly="readonly" class="form-control "/></td>
						</tr>
						<tr>
							<td width="15%"><input readonly="readonly"class="form-control " value="货到付款金额"/></td>
							<td><input id="hdfk" readonly="readonly" class="form-control "/></td>
							<td width="15%">实付货到金额</td>
							<td><input id="hdxj" onblur="js()"  class="form-control required number"/></td>
						</tr>
						<tr>
							<td width="15%"><input readonly="readonly"class="form-control " value="回执合同金额"/></td>
							<td><input id="hzht" readonly="readonly" class="form-control "/></td>
							<td width="15%">实付回执现金</td>
							<td><input id="xj" onblur="js()" class="form-control required number"/></td>
						</tr>
						<tr>
							<td width="15%"><input readonly="readonly"class="form-control " value="回执协议金额"/></td>
							<td><input id="hzxy" readonly="readonly" class="form-control "/></td>
							<td width="15%">实付回执油卡</td>
							<td><input id="yk" onblur="js()" class="form-control required number"/></td>
							<td width="15%">油卡卡号</td>
							<td>
								<select  id="code1"   class="form-control ">

								</select></td>
								<%--<input id="code"  class="form-control"/></td>--%>
						</tr>
						<script>
							function js() {
								var hd=$("#hdxj").val();
                               var yk= $("#yk").val();
                               var xj= $("#xj").val();
                               if(hd==""){
                                   hd="0"
							   }
                                if(yk==""){
                                    yk="0"
                                }
                                if(xj==""){
                                   xj="0"
                                }
                                var zje=parseFloat(hd)+parseFloat(xj)+parseFloat(yk);
                                $("#sfzje2").val(zje);
                            }
                            function js1() {
                                var yk= $("#sfyk").val();
                                var xj= $("#sfxj").val();

                                if(yk==""){
                                    yk="0"
                                }
                                if(xj==""){
                                    xj="0"
                                }
                                var zje=parseFloat(xj)+parseFloat(yk);
                                $("#sfzje3").val(zje);
                            }
						</script>
						<tr>
							<td width="15%"><input readonly="readonly"class="form-control " value="回执总金额"/></td>
							<td><input id="hzzje" readonly="readonly" class="form-control "/></td>
							<td width="15%"><input readonly="readonly"class="form-control " value="实付总金额"/></td>
							<td><input id="sfzje2" readonly="readonly" class="form-control "/></td>
								<td width="15%">增减说明</td>
							<td><input id="remark"  class="form-control required"/></td>
						</tr>
					</table>

				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
					<button type="button" class="btn btn-primary" onclick="qd6()">确定</button>
				</div>
			</div><!-- /.modal-content -->
		</div><!-- /.modal -->
	</div>
	<div class="modal fade" id="myModa2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog" style="width:1100px">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h4 class="modal-title">预付款</h4>
				</div>
				<div class="modal-body">
					<table class="table table-bordered">
						<tr>
							<td width="15%"><input readonly="readonly"class="form-control " value="收款人"/></td>
							<td><input id="skr1" readonly="readonly" class="form-control "/></td>

							<td width="15%"><input readonly="readonly"class="form-control " value="卡号"/></td>
							<td><input id="kh1" readonly="readonly" class="form-control "/></td>

							<td width="15%"><input readonly="readonly"class="form-control " value="开户行"/></td>
							<td><input id="khh1" readonly="readonly" class="form-control "/></td>
						</tr>
						<tr>
							<td width="15%"><input readonly="readonly"class="form-control " value="预付现金"/></td>
							<td><input id="yfxj" readonly="readonly" class="form-control "/></td>
							<td width="15%">实付现金</td>
							<td><input id="sfxj" onblur="js1()" class="form-control "/></td>
						</tr>
						<tr>
							<td width="15%"><input readonly="readonly"class="form-control " value="预付油卡"/></td>
							<td><input id="yfyk" readonly="readonly" class="form-control "/></td>
							<td width="15%">实付油卡</td>
							<td><input id="sfyk" onblur="js1()"  class="form-control number"/></td>
							<td width="15%">油卡卡号</td>
							<td>
								<select id="ykkh"   class="form-control ">

								</select>
								<%--<input id="ykkh"  class="form-control number"/></td>--%>
						</tr>
						<tr>
							<td width="15%"><input readonly="readonly"class="form-control " value="预付总金额"/></td>
							<td><input id="yfzje" readonly="readonly" class="form-control "/></td>
							<td width="15%"><input readonly="readonly"class="form-control " value="实付总金额"/></td>
							<td><input id="sfzje3" readonly="readonly" class="form-control "/></td>

							<td width="15%">增减说明</td>
							<td><input id="remark1"  class="form-control required"/></td>
						</tr>

					</table>

				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
					<button type="button" class="btn btn-primary" onclick="qd1()">确定</button>
				</div>
			</div><!-- /.modal-content -->
		</div><!-- /.modal -->
	</div>
	<div class="modal fade" id="yfqr" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog" style="width:1100px">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h4 class="modal-title">预付款</h4>
				</div>
				<div class="modal-body">
					<table class="table table-bordered">
						<tr>
							<td width="15%"><input readonly="readonly"class="form-control " value="收款人"/></td>
							<td><input id="skr3" readonly="readonly" class="form-control "/></td>

							<td width="15%"><input readonly="readonly"class="form-control " value="卡号"/></td>
							<td><input id="kh3" readonly="readonly" class="form-control "/></td>

							<td width="15%"><input readonly="readonly"class="form-control " value="开户行"/></td>
							<td><input id="khh3" readonly="readonly" class="form-control "/></td>
						</tr>
						<tr>
							<td width="15%"><input readonly="readonly"class="form-control " value="预付现金"/></td>
							<td><input id="yfxj3" readonly="readonly" class="form-control "/></td>
							<td><input readonly="readonly"class="form-control " value="实付现金"/></td>
							<td><input id="sfxj3" readonly="readonly"  class="form-control "/></td>
						</tr>
						<tr>
							<td width="15%"><input readonly="readonly"class="form-control " value="预付油卡"/></td>
							<td><input id="yfyk3" readonly="readonly" class="form-control "/></td>
							<td width="15%"><input readonly="readonly"class="form-control " value="实付油卡"/></td>
							<td><input id="sfyk3" readonly="readonly"  class="form-control number"/></td>
							<td width="15%"><input readonly="readonly"class="form-control " value="油卡卡号"/></td>
							<td><input id="ykkh3" readonly="readonly"  class="form-control number"/></td>
						</tr>
						<tr>
							<td width="15%"><input readonly="readonly"class="form-control " value="预付总金额"/></td>
							<td><input id="yfzje3" readonly="readonly" class="form-control "/></td>
							<td width="15%"><input readonly="readonly"class="form-control " value="实付总金额"/></td>
							<td><input id="sfzje" readonly="readonly" class="form-control "/></td>
							<td width="15%"><input readonly="readonly"class="form-control " value="增减说明"/></td>
							<td><input id="remark3" readonly="readonly" class="form-control required"/></td>
						</tr>

					</table>

				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" onclick="qx3()">作废</button>
					<button type="button" class="btn btn-primary" onclick="qd3()">确定</button>
				</div>
			</div><!-- /.modal-content -->
		</div><!-- /.modal -->
	</div>

</body>
</html>